#ifndef __SCULL_H_
#define __SCULL_H_

#include <linux/cdev.h>


#undef PDEBUG
#ifdef SCULL_DEBUG
#ifdef __KERNEL__
#define PDEBUG(fmt, args...) printk(KERN_DEBUG "scull: " fmt, ##args);
#else
#define PDEBUG(fmt, args...) fprintf(stderr, fmt, ##args)
#endif
#else
#define PDEBUG(fmt, args...) 
#endif

#undef PDEBUGG
#define PDEBUGG(fmt, args...)

#define SCULL_MAJOR 0
#define SCULL_MINOR 0
#define SCULL_NR_DEVS 4

#define SCULL_QUANTUM 100
#define SCULL_QSET 10000


/*
*book ldd3 page60
*/

struct scull_qset {
	void **data;
	struct scull_qset *next;
};

struct scull_dev {
	struct scull_qset *data;
	int quantum;
	int qset;
	unsigned long size;
	unsigned int access_key;
	struct semaphore sem;
	struct cdev cdev;
};


#endif /*__SCULL_H_*/
